﻿/// <reference path="../../Scripts/jquery/jquery-1.4.1-vsdoc.js" />
var curEventName;
var avlmsg = "";
$(function() {
    

    InitializeAvl();

    prm.add_endRequest(function(s, a) {
        InitializeAvl();
        if (avlmsg != "") {
            CallOM(avlmsg);
            avlmsg = "";
        }
    });

    $('a[rel=eventlink]').click(function() {
        $(curEventName).toggleClass("highlight-1");
        $(this).toggleClass("highlight-1");
        curEventName = this;
    });
});

function InitializeAvl() {
    $('.submitbutton').click(function() {
        avlmsg = "邮件模板已更新。"
    });

    $('.paramlist input:text').click(function() {
        $(this).select();
        $('.mailcont textarea').val($('.mailcont textarea').val() + " " + $(this).val() + " ");
    });
}